-- GENERATED SPELL FOR [Tunneling Ghoul] --


function spell0_24084(pUnit, Event) --@Decrepify,n/a--
pUnit:FullCastSpellOnTarget(42702,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24084', 10287, 1)
end

function spell1_24084(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24084', 584, 1)
end

function Sorts_24084(pUnit, Event)
local choix_sorts_24084 = math.random(0, 1)
if choix_sorts_24084 == 0 then
pUnit:RegisterEvent('spell0_24084', 1, 1)
end
if choix_sorts_24084 == 1 then
pUnit:RegisterEvent('spell1_24084', 1, 1)
end
end

function mob24084_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24084', math.random(1500, 3000), 1)
end

function mob24084_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24084_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24084_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24084, 1, 'mob24084_Action')
RegisterUnitEvent(24084, 2, 'mob24084_Leave')
RegisterUnitEvent(24084, 3, 'mob24084_Kill')
RegisterUnitEvent(24084, 4, 'mob24084_Die')
